#include <iostream>

using namespace std;


void swap_int(int &a, int &b)
{
	int temp = a;
	a = b;
	b = temp;
}

void sway_array(int *pA, int *pB, int nCount)
{
	for (int i = 0; i < nCount; i++)
	{
		int nTemp = pA[i];
		pA[i] = pB[i];
		pB[i] = nTemp;
	}
}

int main(int argc, char **argv)
{

	int na = 9, nb = 4;
	swap_int(na, nb);

	int naArray[5] = {2,3,4,5,6};
	int nbArray[5] = { 7, 8, 9, 10, 11 };
	sway_array(naArray, nbArray, 5);
	for (int i = 0; i < 5; i++)
	{
		cout << "naArry[" << i << "]=" << naArray[i] << endl;
		cout << "nbArry[" << i << "]=" << nbArray[i] << endl;
	}

	return 0;
}